'''廖子芸'''
def username(username):
    length = len(username)
    if length < 6 or length > 10:
        raise Exception('qweqwe')
def passwordcheck(password):
    length = len(password)
    if length >= 8 and length <= 16:
        if password.isalnum():
            if password.isdigit() or password.isalpha():
                raise Exception('fffff')
        else:
            raise Exception('qqqqqqqqqqq')
    else:
        raise Exception('yyyyyyyyyyyy')
while True:
    try:
        username = input('iiiiii')
        usernamecCheck(username)
        password - input('q请输入密码；')
        passwordcheck(password)
        print('注册成功！')
        break
    except Exception as e:
        print(e)